<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <meta http-equiv="X-UA-Compatible" content="ie=edge" />
        <title>Knockout.js</title>

        <link rel="stylesheet" href="style.css" />
    </head>
    <body>
        <div id="root">
            <p>通过peek()函数，避免 lastName 的改动依赖，即修改“名”，全名不会更改，只有改姓才生效</p>
            <p>姓(我改了全名就变了)：<input type="text" data-bind="value:firstName" /></p>
            <p>名(我改了不影响全名 T_T)：<input type="text" data-bind="value:lastName" /></p>
            <p>全名：<input type="text" data-bind="value:fullName" /></p>
            <hr />
            <p>姓：<span data-bind="text:firstName"></span></p>
            <p>名：<span data-bind="text:lastName"></span></p>
            <p>全名：<span data-bind="text:fullName"></span></p>
        </div>

        <script src="../scripts/lib/require.js" data-main="index.js"></script>
    </body>
</html>
